<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 47 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */

 /* Position Styles */
 .ts47p0{position:absolute;left:106px;top:97px;}
 .ts47p1{position:absolute;left:352px;top:97px;}
 .ts47p3{position:absolute;left:672px;top:97px;}
 .ts47p7{position:absolute;left:106px;top:113px;}
 .ts47p8{position:absolute;left:706px;top:1026px;}
 .ts47p9{position:absolute;left:331px;top:1044px;}
 .ts47p13{position:absolute;left:106px;top:147px;}
 .ts47p15{position:absolute;left:106px;top:165px;}
 .ts47p16{position:absolute;left:106px;top:184px;}
 .ts47p17{position:absolute;left:106px;top:202px;}
 .ts47p18{position:absolute;left:106px;top:221px;}
 .ts47p20{position:absolute;left:106px;top:239px;}
 .ts47p21{position:absolute;left:106px;top:257px;}
 .ts47p22{position:absolute;left:106px;top:276px;}
 .ts47p23{position:absolute;left:106px;top:294px;}
 .ts47p24{position:absolute;left:106px;top:313px;}
 .ts47p26{position:absolute;left:106px;top:331px;}
 .ts47p27{position:absolute;left:106px;top:349px;}
 .ts47p29{position:absolute;left:106px;top:368px;}
 .ts47p30{position:absolute;left:106px;top:386px;}
 .ts47p31{position:absolute;left:106px;top:405px;}
 .ts47p33{position:absolute;left:106px;top:423px;}
 .ts47p35{position:absolute;left:106px;top:441px;}
 .ts47p36{position:absolute;left:106px;top:460px;}
 .ts47p38{position:absolute;left:106px;top:497px;}
 .ts47p39{position:absolute;left:106px;top:515px;}
 .ts47p41{position:absolute;left:106px;top:533px;}
 .ts47p42{position:absolute;left:106px;top:552px;}
 .ts47p45{position:absolute;left:106px;top:570px;}
 .ts47p47{position:absolute;left:106px;top:589px;}
 .ts47p48{position:absolute;left:106px;top:607px;}
 .ts47p49{position:absolute;left:106px;top:625px;}
 .ts47p51{position:absolute;left:106px;top:644px;}
 .ts47p53{position:absolute;left:106px;top:662px;}
 .ts47p54{position:absolute;left:106px;top:681px;}
 .ts47p55{position:absolute;left:106px;top:699px;}
 .ts47p57{position:absolute;left:106px;top:717px;}
 .ts47p58{position:absolute;left:106px;top:736px;}
 .ts47p59{position:absolute;left:106px;top:754px;}
 .ts47p62{position:absolute;left:106px;top:773px;}
 .ts47p63{position:absolute;left:106px;top:792px;}
 .ts47p64{position:absolute;left:106px;top:810px;}
 .ts47p66{position:absolute;left:106px;top:828px;}
 .ts47p67{position:absolute;left:106px;top:846px;}
 .ts47p69{position:absolute;left:106px;top:865px;}
 .ts47p70{position:absolute;left:106px;top:883px;}
 .ts47p72{position:absolute;left:106px;top:901px;}
 .ts47p73{position:absolute;left:106px;top:919px;}
 .ts47p74{position:absolute;left:106px;top:938px;}
 .ts47p76{position:absolute;left:106px;top:956px;}
 .ts47p78{position:absolute;left:106px;top:975px;}
 .ts47p79{position:absolute;left:552px;top:257px;}
 .ts47p82{position:absolute;left:552px;top:268px;}
 .ts47p83{position:absolute;left:552px;top:281px;}

 /* Font Styles */
 .ft0p47{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p47{font-weight:normal;}
 .ft2p47{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p47{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p47{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p47{font-style:normal;font-weight:normal;font-size:16px;font-family:"courier new",courier,monospace;color:#000000;}
 .ft6p47{font-family:arial,sans-serif;}
 .ft7p47{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}
 .ft8p47{font-style:normal;font-weight:bold;font-size:21px;font-family:arial,sans-serif;color:#808080;}
 .ft9p47{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#FFFFFF;}
 .ft10p47{font-style:normal;font-weight:normal;font-size:11px;font-family:arial,sans-serif;color:#000000;}

 /* Background Style */
 .styleBackground47{position:absolute;left:97px;top:145px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index46.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;47 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index48.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground47><img src="./background47.png" width="641" height="910" border="0" alt=""></div>
<div class=ts47p0><span class="ft0p47"> </span></div>
<div class=ts47p1><span class="ft0p47">Gravitybox Schedule Primer<span class="ft1p47"> </span></span></div>
<div class=ts47p3><span class="ft0p47">Page 45&nbsp; </span></div>
<div class=ts47p7><span class="ft2p47"> </span></div>
<div class=ts47p8><span class="ft3p47"> </span></div>
<div class=ts47p9><span class="ft4p47">1998&#45;2004 Gravitybox Software LLC<span class="ft3p47"> </span></span></div>
<div class=ts47p13><span class="ft5p47">Schedule1.ScheduleItems(3).MaxLength = 120<span class="ft6p47"> </span></span></div>
<div class=ts47p15><span class="ft7p47"> </span></div>
<div class=ts47p16><span class="ft7p47"> </span></div>
<div class=ts47p17><span class="ft7p47">This code will set the third element in the ScheduleItems collection, so that it may not be </span></div>
<div class=ts47p18><span class="ft7p47">smaller than 30 minutes and no larger than 2 hours. </span></div>
<div class=ts47p20><span class="ft7p47"> </span></div>
<div class=ts47p21><span class="ft7p47">There are two of events raised as a consequence of </span></div>
<div class=ts47p22><span class="ft7p47">resizing an appointment. The first is the BeforeItemResize </span></div>
<div class=ts47p23><span class="ft7p47">event. This event has as its parameters the appointment&#146;s </span></div>
<div class=ts47p24><span class="ft7p47">index in the ScheduleItems collection and a Boolean Cancel parameter. Once an </span></div>
<div class=ts47p26><span class="ft7p47">appointment is resized the AfterItemResize event is raised with the appointment&#146;s index </span></div>
<div class=ts47p27><span class="ft7p47">as a parameter. </span></div>
<div class=ts47p29><span class="ft7p47"> </span></div>
<div class=ts47p30><span class="ft7p47">When the user is dragging an edge of an appointment, the WhileItemResize event will </span></div>
<div class=ts47p31><span class="ft7p47">be raised repeatedly. As the user drags an appointment edge, it may be resized many </span></div>
<div class=ts47p33><span class="ft7p47">times before he releases the mouse button. Each resize triggers this event. </span></div>
<div class=ts47p35><span class="ft7p47"> </span></div>
<div class=ts47p36><span class="ft8p47">AllowOtherDrops </span></div>
<div class=ts47p38><span class="ft7p47">A special Add may be performed if required. A drag of some external object to a </span></div>
<div class=ts47p39><span class="ft7p47">schedule may be desired. This could be a file, picture, etc. Although these items are not </span></div>
<div class=ts47p41><span class="ft7p47">appointments, they might have some significance in your application. In this case, the </span></div>
<div class=ts47p42><span class="ft7p47">schedule property AllowOtherDrops will allow dropping of non&#45;GbSchedule items on the </span></div>
<div class=ts47p45><span class="ft7p47">schedule. This will be performed as follows. The DragDropScheduleItem event will be </span></div>
<div class=ts47p47><span class="ft7p47">raised when the drop has taken place. The BeforeAdd and AfterAdd events will then be </span></div>
<div class=ts47p48><span class="ft7p47">raised, providing an opportunity to do any verification and also to cancel the Add if </span></div>
<div class=ts47p49><span class="ft7p47">necessary. Afterwards the BeforeEdit and AfterEdit events will be raised, in response to </span></div>
<div class=ts47p51><span class="ft7p47">the editing with the default property box. </span></div>
<div class=ts47p53><span class="ft7p47"> </span></div>
<div class=ts47p54><span class="ft7p47">This action actually takes a bit of work. The source control must be setup as OLEDrag </span></div>
<div class=ts47p55><span class="ft7p47">enabled. This may be accomplished by using three events of the source control. For </span></div>
<div class=ts47p57><span class="ft7p47">example, assume there is a form that has a Listbox and a Schedule on it and the user </span></div>
<div class=ts47p58><span class="ft7p47">should be able to drag a list item from the Listbox and drop it on the Schedule. This may </span></div>
<div class=ts47p59><span class="ft7p47">be accomplished by using the source&#146;s MouseDown event to initiate a drag as follows. </span></div>
<div class=ts47p62><span class="ft7p47"> </span></div>
<div class=ts47p63><span class="ft5p47">Private Sub List1_MouseDown(Button As Integer, Shift As </span></div>
<div class=ts47p64><span class="ft5p47">Integer, X As Single, Y As Single) </span></div>
<div class=ts47p66><span class="ft5p47"> </span></div>
<div class=ts47p67><span class="ft5p47">&nbsp; Call List1.OLEDrag </span></div>
<div class=ts47p69><span class="ft5p47"> </span></div>
<div class=ts47p70><span class="ft5p47">End Sub<span class="ft6p47"> </span></span></div>
<div class=ts47p72><span class="ft7p47"> </span></div>
<div class=ts47p73><span class="ft7p47">This action will start the drag; however nothing will happen until there is code in other </span></div>
<div class=ts47p74><span class="ft7p47">events as well. The schedule expects a particular type of drag, so this needs to be </span></div>
<div class=ts47p76><span class="ft7p47">defined in the source&#146;s OLEStartDrag event. </span></div>
<div class=ts47p78><span class="ft7p47"> </span></div>
<div class=ts47p79><span class="ft9p47">Quick Tip </span></div>
<div class=ts47p82><span class="ft10p47">Cancel a user resize in the </span></div>
<div class=ts47p83><span class="ft10p47">&#147;BeforeItemResize&#148; event. </span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
